import os
import tensorflow as tf

if __name__ == '__main__':
    os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'

    m = tf.constant([[1,2],[3,4]])
    n = tf.constant([[5,6],[7,8]])

    print(m)
    print(n)

    # print(tf.multiply(m, n))
    # 矩阵乘法
    print(tf.matmul(m, n))

    # python 版本要求 ：>= 3.5
    # 二元运算符 @ 用于矩阵的乘法
    print(m @ n)